/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.gpstracking.Utils;

import java.util.Date;

/**
 *
 * @author jmj
 */
public class DateUtil {
    public boolean inside( Date in , Date l, Date u, int offset){
        if ( offset > 0 ){
            return recurrent( in, l , u, offset );
        }
        
        if (l.before( in ) && u.after(in)) return true;
        
        if (l.equals(in) || u.equals(in)) return true;
        
        return false;
    }
    public boolean recurrent( Date in, Date l , Date u, int days){
        /*
         * FIX :
         * long offset = days * 24 * 60 * 100;
        
        Date today = new Date();
        
        long in_milisec = today.getTime() + offset;
        
        Date in = new Date( in_milisec );*/
        
        return true;
        
    }
    public int getOffset( Date fecha, int days){
        //FIX:
        return 0;
    }
}
